<template>
  <div class="inner">
    <el-table :data="props.data" style="width: 100%">
      <el-table-column prop="program" label="管理项目" />
      <el-table-column prop="mngtMember" label="项目总人数" />
      <el-table-column prop="highRiskNumber" label="高风险人数" />
      <el-table-column
        prop="highRiskPercent"
        label="高风险占比"
        :formatter="valueToPersent"
      />
    </el-table>
  </div>
</template>
<script setup lang="ts">
import { PropType } from "vue";
interface DataInt {
  program: string;
  mngtMember: number;
  highRiskNumber: number;
  highRiskPercent: number;
}

function valueToPersent(row, column, value) {
  // console.log("row, column, value:", row, column, value);
  return (value * 100).toFixed(2) + "%";
}
const props = defineProps({
  data: Array as PropType<DataInt[]>
});
</script>
